package com.ivan.blog.controller.front;

import com.ivan.blog.result.Result;
import com.ivan.blog.vo.UserVo;
import org.springframework.web.bind.annotation.*;


/*
 * @Author      Ivan
 * @Date        2023/4/16 8:04
 * @Description LoginController
 */
@CrossOrigin
@RestController
@RequestMapping("/front/user")
public class FrontLoginController {

    @PostMapping("/login")
    public Result login(@RequestBody UserVo userVo){
        System.out.println(userVo);
        if (!"123".equals(userVo.getPassword())) {
            return Result.fail("用户名或密码错误");
        }
        return Result.ok();
    }
}
